************************
*Descriptive Statistics*
************************

sum attacks attacks_loc attacks_nat lntroops govsup_A rebsup_A war lnmindist civilwar_s civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar if year != 1993 & polreldyad == 1

********************
*Troop Deployments *
********************

nbreg attacks L.lntroops war lnmindist civilwar_s civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks if year != 1993 & polreldyad ==1, r cluster(dyadid) 
	*232 iterations
nbreg attacks_nat L.lntroops war lnmindist civilwar_s civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks_nat if year != 1993 & polreldyad ==1, r cluster(dyadid)
	*102 iterations
nbreg attacks_loc L.lntroops war lnmindist civilwar_s civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks_loc if year != 1993 & polreldyad ==1, r cluster(dyadid)
	*72 iterations


************************
*Civil War Intervention*
************************

nbreg attacks L.govsup_A L.rebsup_A war lnmindist civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks if year != 1993 & civilwar_s == 1, r cluster(dyadid)
	*55 iterations
nbreg attacks L.govsup_A L.rebsup_A war lnmindist civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks if year != 1993 & polreldyad ==1 & civilwar_s == 1, r cluster(dyadid)
	*17 iterations
nbreg attacks_nat L.govsup_A L.rebsup_A war lnmindist civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks_nat if year != 1993 & polreldyad ==1 & civilwar_s == 1, r cluster(dyadid)
	*13 iterations
nbreg attacks_loc L.govsup_A war lnmindist civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks_loc if year != 1993 & polreldyad ==1 & civilwar_s == 1, r cluster(dyadid)
	*46 iterations, no cases of location-based attacks and rebel support


*************************
*Predicted Probabilities*
*************************

*using SPost13

nbreg attacks lgovsup_A lrebsup_A war lnmindist civilwar_t democracy1 democracy2 lnpop1 lnpop2 lngdppc1 lngdppc2 coldwar lattacks if year != 1993 & polreldyad ==1 & civilwar_s == 1, r cluster(dyadid)
prvalue, x(lgovsup_A = 0 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.388 lnpop2 = 15.997 lngdppc1 = 4.983 lngdppc2 = 6.463 coldwar= 1 lattacks = 0)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.392 lnpop2 = 16.035 lngdppc1 = 4.956 lngdppc2 = 6.446 coldwar= 1 lattacks = 0)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.391 lnpop2 = 16.071 lngdppc1 = 5.094 lngdppc2 = 6.422 coldwar= 1 lattacks = 0)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.390 lnpop2 = 16.105 lngdppc1 = 5.174 lngdppc2 = 6.460 coldwar= 1 lattacks = 2)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.394 lnpop2 = 16.136 lngdppc1 = 5.233 lngdppc2 = 6.479 coldwar= 1 lattacks = 0)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.409 lnpop2 = 16.165 lngdppc1 = 5.228 lngdppc2 = 6.518 coldwar= 1 lattacks = 3)
prvalue, x(lgovsup_A = 1 lrebsup_A = 0 war = 0  lnmind ==0 civilwar_t = 0  democracy1 = 0 democracy2 = 0  lnpop1 = 16.434 lnpop2 = 16.192 lngdppc1 = 5.250 lngdppc2 = 6.545 coldwar= 1 lattacks = 5)
